package com.group02.community.controller;

import com.group02.community.service.IRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("roleMenu")
public class RoleMenuController {

    @Autowired
    IRoleMenuService roleMenuService;

    @GetMapping("roleMenu")
    public ResponseEntity<List<Long>> addUser(Long id){
        List<Long> list=roleMenuService.getRoleMenuIdsById(id);
        return ResponseEntity.ok(list);
    }

}
